local feidu = fk.CreateSkill{
    name = "lingling__feidu"
}
Fk:loadTranslationTable{
    ["lingling__feidu"] = "飞渡",
    [":lingling__feidu"] = "出牌阶段限一次，你可以将两张牌当【决斗】使用，若皆为装备牌，且可以额外指定一名目标。",
    ["#lingling__feidu"] = "飞渡：将两张牌当【决斗】使用",
}

feidu:addEffect("viewas", {
    anim_type = "offensive",
    prompt = "#lingling__feidu",
    card_filter = function(self, player, to_select, selected)
        return #selected < 2
    end,
    view_as = function(self, player, cards)
        if #cards ~= 2 then return end
        local c = Fk:cloneCard("duel")
        c.skillName = feidu.name
        c:addSubcards(cards)
        return c
    end,
    enabled_at_play = function (self, player)
        return not player:isNude() and player:usedSkillTimes(feidu.name, Player.HistoryPhase) == 0
    end,
})

feidu:addEffect("targetmod", {
    extra_target_func = function(self, player, skill, card)
        if card and table.contains(card.skillNames, feidu.name) and #card.subcards > 0 and table.every(card.subcards,function (cardID)
            return Fk:getCardById(cardID).type == Card.TypeEquip
        end) then
            return 1
        end
    end,
})

return feidu